using System.Collections.Immutable;

using Bee.Base.Models;

namespace Bee.Plugin.Multimedia;


public class MultimediaProcessConsts
{
    public const string PluginName = "MultimediaProcess";
    /// <summary>
    /// 参数默认分隔符
    /// </summary>
    public const char DefaultDelimiter = '|';
    /// <summary>
    /// 可用音频格式
    /// </summary>
    public static string[] AvailableAudioFormats => ["mp3", "flac", "ape", "wav", "aac", "ogg", "aiff", "m4a", "wma", "aac", "ac3", "mka", "tak", "amr"];
    /// <summary>
    /// 可用视频格式
    /// </summary>
    public static string[] AvailableVideoFormats => ["mp4", "mkv", "avi", "webm", "flv", "mov", "wmv", "ogv", "ts", "mxf", "rm", "mpeg", "vob"];

    public static string[] AvailableFormats => [.. AvailableAudioFormats, .. AvailableVideoFormats];
    /// <summary>
    /// 可用视频编解码器
    /// </summary>
    public static ImmutableList<NameValue> AvailableVideoCodecs =>
    [
        new NameValue ("libx264", "H.264"),
        new NameValue ("libx265", "H.265/HEVC"),
        new NameValue ("libvpx", "VP8"),
        new NameValue ("libvpx-vp9", "VP9"),
        new NameValue ("libtheora", "Theora"),
        new NameValue ("libaom-av1", "AV1"),
        new NameValue ("mpeg4", "MPEG-4 Part 2"),
        new NameValue ("mjpeg", "Motion JPEG"),
        new NameValue ("prores", "Apple ProRes"),
        // new NameValue ("prores_ks", "Kinemetric's Specialized ProRes"),
        new NameValue ("dnxhd", "DNxHD/DNxHR"),
        new NameValue ("mpeg2video", "MPEG-2 Video"),
    ];
    /// <summary>
    /// 可用音频编解码器
    /// </summary>
    public static ImmutableList<NameValue> AvailableAudioCodecs =>
    [
        new NameValue ("aac", "AAC"),
        new NameValue ("libmp3lame", "MP3"),
        new NameValue ("flac", "FLAC"),
        new NameValue ("alac", "ALAC"),
        new NameValue ("ac3", "AC3"),
        new NameValue ("dca", "DTS"),
        new NameValue ("pcm_s16le", "WAV"),
        new NameValue ("libvorbis", "Vorbis"),
        new NameValue ("libopus", "Opus")
    ];
    /// <summary>
    /// 可用帧率
    /// </summary>
    public static ImmutableList<double> AvailableFpsList => [10, 20, 24, 25, 29.97, 30, 48, 50, 59.94, 60];
    /// <summary>
    /// 可用缩放分辨率
    /// </summary>
    public static ImmutableList<string> AvailableScaleResolutions =>
    [
        "3840x2160",
        "3072x1728",
        "2880x1620",
        "2560x1440",
        "2304x1296",
        "2192x1234",
        "1920x1080",
        "1704x960",
        "1536x864",
        "1396x784",
        "1280x720",
        "640x480"
    ];
    /*
    /// <summary>
    /// 可用缩放算法
    /// </summary>
    public static ImmutableList<NameValue> AvailableScaleAlgorithms =>
    [
        new NameValue("bicubic", "(默认) 平滑的缩放，适用于大多数情况。"),
        new NameValue("bilinear", "较快但质量稍低的缩放。"),
        new NameValue("neighbor", "最近邻插值，适用于像素艺术等需要保持块状效果的情况。"),
        new NameValue("lanczos", "高质量的缩放，适合对细节要求较高的场景。"),
        new NameValue("spline", "样条插值，提供平滑的缩放效果。"),
        new NameValue("area", "通过平均区域内的像素值进行缩放，适合缩小图像。"),
    ];
    */
}